﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Plugin;
using Settings;
using Serialization;
using DependencyInjection;

using PolarExpress.View;
using PolarExpress.View.Interfaces;

using PolarExpress.Model;
using PolarExpress.Model.Interfaces;

using PolarExpress.Controller;
using PolarExpress.Controller.Interfaces;

namespace PolarExpress
{
    public class MainModule : AbstractModule
    {
        protected override void Configure()
        {
            Bind(typeof(ISerializer), typeof(JSONSerializer), true);
            Bind(typeof(BaseSettings), typeof(AppSettings), true);

            Bind(typeof(IProject), typeof(Project), true);

            Bind(typeof(PluginManager), typeof(PluginManager), true);

            Bind(typeof(IMainView), typeof(FrmMainView), true);
            Bind(typeof(IErrorView), typeof(FrmErrorView), true);
            Bind(typeof(IEventView), typeof(FrmEventView), true);
            Bind(typeof(IExplorerView), typeof(FrmExplorerView), true);
            Bind(typeof(IOutputView), typeof(FrmOutputView), true);
            Bind(typeof(IPlayView), typeof(FrmPlayView), true);
            Bind(typeof(IPropertyView), typeof(FrmPropertiesView), true);
            Bind(typeof(ISceneView), typeof(FrmSceneView), true);
            Bind(typeof(IToolboxView), typeof(FrmToolboxView), true);
            Bind(typeof(IWarningView), typeof(FrmWarningView), true);

            Bind(typeof(IMainController), typeof(MainController), true);
            Bind(typeof(IErrorController), typeof(ErrorController), true);
            Bind(typeof(IEventController), typeof(EventController), true);
            Bind(typeof(IExplorerController), typeof(ExplorerController), true);
            Bind(typeof(IOutputController), typeof(OutputController), true);
            Bind(typeof(IPlayController), typeof(PlayController), true);
            Bind(typeof(IPropertiesController), typeof(PropertiesController), true);
            Bind(typeof(ISceneController), typeof(SceneController), true);
            Bind(typeof(IToolboxController), typeof(ToolboxController), true);
            Bind(typeof(IWarningController), typeof(WarningController), true);
        }
    }
}
